<?php

namespace app\model;

use think\Model;

// 订单产品明细表
class OrderProducts extends Model
{
    // Define the table name
    protected $name = 'order_products';
    public $timestamps = false;
    
    // 订单关联
    public function order()
    {
        return $this->hasOne(Orders::class, 'id', 'order_id');
    }
    
    // 产品关联
    public function product()
    {
        return $this->hasOne(Products::class, 'id', 'product_id');
    }
    
    // 商户关联
    public function seller()
    {
        return $this->hasOne(Sellers::class, 'id', 'seller_id');
    }
}